<template>
  <el-card>
    <el-row :gutter="20">
      <el-col v-for="item in navItem" :key="item.path" :xs="12" :sm="8" :md="6">
        <div
          class="grid-content"
          :style="{ backgroundColor: item.color }"
          @click="linkTo(item.path)"
        >
          <i :class="['iconfont', item.icon]" />
          <span>{{ item.name }}</span>
        </div>
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      navItem: [
        {
          path: '/task_issue/navtao',
          icon: 'icon-tao',
          name: '淘精补',
          color: '#f80'
        },
        {
          path: '/task_issue/navpin',
          icon: 'icon-pinduoduo',
          name: '拼精补',
          color: '#f20108'
        },
        {
          path: '/task_issue/navjing',
          icon: 'icon-jingdong',
          name: '京精补',
          color: '#d6251f'
        },
        {
          path: '/task_issue/navdian',
          icon: 'icon-faqiyuzhidianfu',
          name: '垫付定制',
          color: '#4b2b2f'
        },
        {
          path: '/task_issue/navgprs',
          icon: 'icon-liuliang',
          name: '流量定制',
          color: '#326bbc'
        },
        {
          path: '/task_issue/navlives',
          icon: 'icon-airudiantubiaohuizhi-zhuanqu_zhibojian',
          name: '直播间定制',
          color: '#ad5ffc'
        },
        {
          path: '/task_issue/navvideos',
          icon: 'icon-duanshipin',
          name: '短视频定制',
          color: '#fee200'
        }
      ]
    }
  },
  methods: {
    linkTo(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style lang="scss" scoped>
.el-card {
  height: 700px;
  padding: 20px;
}

.el-row {
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.grid-content {
  line-height: 62px;
  border-radius: 4px;
  margin-bottom: 30px;
  padding: 0 30px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: flex;

  i {
    font-size: 30px;
    margin-right: 10px;
  }
  span {
    font-size: 20px;
    white-space: nowrap;
  }
}
</style>
